﻿namespace CSharpPro._1027;

public class Test
{
    public static void Test1()
    {
        // 测试抽象类和子类
        UserTest test = new UserTestChild();
        test.M1();
        string resultM2 = test.M2();
        Console.WriteLine(resultM2);
        test.M3(123);

        // 测试接口和实现类
        UserService service = new UserServiceImpl();
        service.AddUser("张三");
        service.DeleteUser("1");
        service.UpdateUser("2", "李四");
        string queryResult = service.QueryUser("3");
        Console.WriteLine(queryResult);
    }
}